package com.huaxiafinance.management.util;


import org.apache.log4j.Logger;

import java.io.InputStreamReader;
import java.util.Properties;


public class PropertiesLoader
{
    private static final Logger log = Logger.getLogger(PropertiesLoader.class);

    public static String getProperty(String property)
    {
        Properties prop = new Properties();
        try
        {
            InputStreamReader inputStreamReader = new InputStreamReader(
                PropertiesLoader.class.getClassLoader().getResourceAsStream(
                    "application.properties"),
                "UTF-8");
            prop.load(inputStreamReader);
            inputStreamReader.close();
        }
        catch (Exception e)
        {
            log.error("错误++++++" + e);
        }
        return prop.getProperty(property);
    }
}
